#pragma once

#include <memory.h>
#include "IReadingInformation.h"
#include "ITime.h"


// Chart

class Chart : public CPane
{
	DECLARE_DYNAMIC(Chart)

public:
	Chart();
	virtual ~Chart();

	void setReadingInformation(Sensor::IReadingInformation *readingInformation) {
		this->readingInformation = readingInformation;
	}

	void setSensorId(int sensorId) {
		this->sensorId = sensorId;
	}

	void setReadingType(std::string readingType) {
		this->readingType = readingType;
	}

	void setStartTime(unique_ptr<ITime> startTime) {
		this->startTime = std::move(startTime);
	}

	void setEndTime(unique_ptr<ITime> endTime) {
		this->endTime = std::move(endTime);
	}

protected:
	DECLARE_MESSAGE_MAP()

	void OnPaint();

private:
	Sensor::IReadingInformation *readingInformation;
	unique_ptr<ITime> startTime;
	unique_ptr<ITime> endTime;
	int sensorId;
	std::string readingType;
};


